import requests from "./requests"

export const reqLogin = (data) => {
    return requests({
        url: "/auth/manage/login",
        method: 'post',
        data: data
    })
}

export const reqDoctorInfo = () => {
    return requests({
        url: "/doctor/getDoctorInfo",
        method: 'get',
    })
}

export const reqAdminInfo = () => {
    return requests({
        url: "/admin/getAdminInfo",
        method: 'get',
    })
}

export const reqAdminMenuList = () => {
    return requests({
        url: "/adminMenu/getAdminMenuList",
        method: 'get',
    })
}

export const reqParentAdminMenu = () => {
    return requests({
        url: "/adminMenu/getParentMenu",
        method: 'get',
    })
}

export const reqAddMenu = (data) => {
    return requests({
        url: "/adminMenu/saveAdminMenu",
        method: 'post',
        data: data
    })
}

export const reqUserPag = () => {
    return requests({
        url: "/user/manage/getUserInfoPag",
        method: 'get',
    })
}

export const reqUserAdminMenu = (data) => {
    return requests({
        url: "/user/manage/getUserAdminMenu",
        method: 'get',
        params: data
    })
}

export const reqUserRoleAndAll = (data) => {
    return requests({
        url: "/user/manage/getUserRoleAndAll",
        method: 'get',
        params: data
    })
}

export const reqSaveUserRole = (data) => {
    return requests({
        url: "/user/manage/saveUserRole",
        method: 'post',
        data: data
    })
}

export const reqUserInfo = () => {
    return requests({
        url: "/user/manage/getUserInfoAndPerm",
        method: 'get',
    })
}

export const reqRolePag = (data) => {
    return requests({
        url: "/role/getRolePag",
        method: 'get',
        params: data
    })
}

export const reqRoleAdminMenu = (data) => {
    return requests({
        url: "/role/getRoleAdminMenuList",
        method: 'get',
        params: data
    })
}

export const reqSaveRoleAdminMenu = (data) => {
    return requests({
        url: `/role/updateRoleAdminMenu/${data.roleId}`,
        method: 'put',
        data: data.adminMenuIds
    })
}

export const reqSavePermission = (data) => {
    return requests({
        url: "/menu/saveMenuInfo",
        method: 'post',
        data: data
    })
}

export const reqLoginLogList = (data) => {
    return requests({
        url: "/loginLog/getLoginLogPag",
        method: 'get',
        params: data
    })
}

export const reqRoleMenu = (data) => {
    return requests({
        url: "/role/getRoleMenuList",
        method: 'get',
        params: data
    })
}

export const reqRolePermission = (data) => {
    return requests({
        url: "/menu/getMenuList",
        method: 'get',
        params: data
    })
}

export const reqSaveRoleMenu = (data) => {
    return requests({
        url: `/role/updateRoleMenu/${data.roleId}`,
        method: 'put',
        data: data.menuIds
    })
}

export const reqMenuCategory = () => {
    return requests({
        url: "/menu/getMenuCategory",
        method: 'get',
    })
}

export const reqOrderList = (data) => {
    return requests({
        url: "/order/manage/getAllUserOrderList",
        method: 'get',
        params: data
    })
}

export const reqDoctorDealOrder = (data) => {
    return requests({
        url: "/deal/doctor/dealOrderDoctor",
        method: 'post',
        data: data
    })
}

export const reqUploadDoctorAvatar = (data) => {
    return requests({
        url: "/doctor/doctor/uploadDoctorAvatar",
        method: 'post',
        data: data
    })
}

export const reqUploadDoctorInfo = (data) => {
    return requests({
        url: "/doctor/doctor/updateDoctorInfo",
        method: 'put',
        data: data
    })
}

export const reqJobList = () => {
    return requests({
        url: "/job/getJobList",
        method: 'get',
    })
}

export const reqDealDoctorList = (data) => {
    return requests({
        url: "/deal/doctor/getDoctorDealList",
        method: 'get',
        params: data
    })
}

export const reqHostpitalInfo = () => {
    return requests({
        url: "/hospital/hospital/getHospitalInfo",
        method: 'get',
    })
}

export const reqUploadAdminAvatar = (data) => {
    return requests({
        url: "/admin/uploadAdminAvatar",
        method: 'post',
        data: data
    })
}

export const reqUploadAdminInfo = (data) => {
    return requests({
        url: "/admin/updateAdminInfo",
        method: 'put',
        data: data
    })
}

export const reqUploadHospitalInfo = (data) => {
    return requests({
        url: "/hospital/updateHospitalInfo",
        method: 'put',
        data: data
    })
}

export const reqHospitalDoctorList = (data) => {
    return requests({
        url: "/doctor/getHospitalDoctorPag",
        method: 'get',
        params: data
    })
}

export const reqDeleteDoctor = (data) => {
    return requests({
        url: `/doctor/manage/deleteDoctorInfo/${data}`,
        method: 'delete',
    })
}

export const reqReturnDoctor = (data) => {
    return requests({
        url: `/doctor/manage/returnDoctorInfo/${data}`,
        method: 'put',
    })
}

export const reqHospitalPag = (data) => {
    return requests({
        url: "/hospital/getHospitalPag",
        method: 'get',
        params: data
    })
}

export const reqChatList = () => {
    return requests({
        url: "/message/getChatList",
        method: 'get',
    })
}